/*
 * @Description: 第二天作业第10题
 * 
 * @Author: rendc
 * 
 * @Date: 2024-10-12 15:25:51
 * 
 * @LastEditors: rendc
 * 
 * @LastEditTime: 2024-10-12 15:58:01
 */
/**
 * Test10 - 生产者消费者
 */
public class Test10 {

  public static void main(String[] args) {
    // 创建对象
    Clerk clerk = new Clerk();
    // System.out.println(clerk);
    Productor p1 = new Productor(clerk);
    Productor p2 = new Productor(clerk);
    Customer c1 = new Customer(clerk);
    Customer c2 = new Customer(clerk);
    Customer c3 = new Customer(clerk);
    p1.setName("打工人1");
    // p2.setName("打工人2");
    c1.setName("上帝人1");
    c2.setName("上帝人2");
    c3.setName("上帝人3");
    p1.start();
    p2.start();
    c1.start();
    c2.start();
    c3.start();

  }
}